<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/3
 * Time: 14:30
 */

namespace backend\modules\kingdee\controllers;


use common\models\kingdee\Diploma;
use common\models\kingdee\HrFolk;
use common\models\kingdee\HrHealth;
use common\models\kingdee\HrPolitical;
use common\models\kingdee\HrWed;
use common\models\kingdee\Nationality;
use common\models\kingdee\Person;
use common\models\kingdee\Regpermresidence;
use yii\web\Controller;

class EmployeeSummaryController extends Controller
{
    public function actionIndex(){
        $personCount = Person::find()->count();
        $wedCount = HrWed::find()->count();
        $healthCount = HrHealth::find()->count();
        $folkCount = HrFolk::find()->count();
        $nationalityCount = Nationality::find()->count();
        $politicalFaceCount = HrPolitical::find()->count();
        $regpermresidenceCount = Regpermresidence::find()->count();
        $diplomaCount = Diploma::find()->count();

        return $this->render('index', [
            'personCount' => $personCount,
            'wedCount' => $wedCount,
            'healthCount' => $healthCount,
            'folkCount' => $folkCount,
            'nationalityCount' => $nationalityCount,
            'politicalFaceCount' => $politicalFaceCount,
            'regpermresidenceCount' => $regpermresidenceCount,
            'diplomaCount' => $diplomaCount,
        ]);
    }
}